﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucFAQ.ascx.cs" Inherits="SES.CMS.AdminCP.PageUC.ucFAQ" %>
<h2>
    Danh sách câu hỏi</h2>
<div style="width: 90%; float: left; margin-bottom: 10px;">
    Lựa chọn :<asp:DropDownList runat="server" AutoPostBack="true" ID="ddlHoiDap" AppendDataBoundItems="true">
        <asp:ListItem Text="--All--" Value="0"></asp:ListItem>
    </asp:DropDownList>
</div>
<div style="float: left; width: 100%;">
    <asp:GridView ID="gvHoiDap" DataKeyNames="HoiDapID" runat="server" AutoGenerateColumns="False"
        Font-Size="12px" BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px"
        CellPadding="4" OnRowDeleting="gvHoiDap_RowDeleting" OnSelectedIndexChanged="gvHoiDap_SelectedIndexChanged"
        AllowPaging="True" PageSize="50" Width="100%" OnPageIndexChanging="gvHoiDap_PageIndexChanging"
        OnRowEditing="gvHoiDap_RowEditing">
        <RowStyle BackColor="White" ForeColor="#330099" HorizontalAlign="Center" VerticalAlign="Bottom" />
        <Columns>
            <asp:BoundField DataField="HoTenNguoiHoi" HeaderText="Người hỏi"/>
            <asp:BoundField DataField="Email" HeaderText="Email"/>
            <asp:BoundField DataField="CauHoi" HeaderText="Câu hỏi"/>
            <asp:BoundField DataField="NgayHoi" HeaderText="Ngày hỏi" />
            <asp:CheckBoxField DataField="HienThi" HeaderText="Hiển thị" />
            <asp:CheckBoxField DataField="DaTraLoi" HeaderText="Đã trả lời" />
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:ImageButton ID="btEdit" runat="server" CommandName="Select" ImageUrl="~/AdminCP/images/edit_16x16.gif" />
                    <asp:ImageButton ID="btDelete" runat="server" CommandArgument='<%#Eval("HoiDapID") %>'
                        CommandName="Delete" ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
        <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" VerticalAlign="Middle" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
    </asp:GridView>
</div>
